<?php
// turn on error reporting, so we know when things go wrong
error_reporting(E_ALL);
ini_set('display_errors', true);

// update PHP include_path to include the location of the VidoopSecure library
set_include_path(dirname(dirname(__FILE__)) . PATH_SEPARATOR . get_include_path());

// require the VidoopSecure manager class and our local configuration
require_once 'Auth/Vidoop/Secure.php';
require_once dirname(__FILE__) . '/config.php';


// create an Auth_Vidoop_Secure instance, and give it our site credentials
$api_base = isset($config['api_base']) ? $config['api_base'] : NULL;
$vs = new Auth_Vidoop_Secure($config['customer'],NULL,$api_base);
$vs->site($config['site'], $config['username'], $config['password']);
if (isset($config['debug'])) {
	$vs->setDebug(true);
}
if (isset($config['ssl_cert'])) {
	$vs->setSSLCert($config['ssl_cert']);
}
if (isset($config['ssl_cert_folder'])) {
	$vs->setSSLCertFolder($config['ssl_cert_folder']);
}

?>
